//  除了首页 和登录   动态菜单  全部导航  

// 产品管理
import GoodsManage from '@/views/GoodsManage'
import GoodsList from '@/views/GoodsManage/List'
import AddGoods from '@/views/GoodsManage/List/AddGoods'
import Category from '@/views/GoodsManage/Category'


//订单管理
import OrderManage from '@/views/OrderManage'
import OrderList from '@/views/OrderManage/List'
import Collect from '@/views/OrderManage/Collect'
import Contract from '@/views/OrderManage/Contract'


//广告管理
import Advert from '@/views/Advert'
import AdvertList from '@/views/Advert/List'
import AdvertManage from '@/views/Advert/AdvertManage'



// 系统管理
const SystemManage = () =>import('@/views/SystemManage')
const Role = () =>import('@/views/SystemManage/Role')
const Department = () =>import('@/views/SystemManage/Department')

export const menu = [
    {
        path: '/goods',
        name:'goodsmanage',
        component: GoodsManage,
        redirect:'/goods/list',
        meta:{
           title:'产品管理',
        },
        children:[
          {
            path: 'list',
            name:'goodslist',
            component: GoodsList,
            meta:{
              title:'产品列表',
            },
          },
          {
            path: 'category',
            name:'category',
            component: Category,
            meta:{
              title:'产品分类',
            },
          },
          {
            path: 'addgoods',   // 商品添加和编辑
            name:'addgoods',
            component: AddGoods,
            // 路由元信息
            meta:{
              //activeMenu:'/goods/list',   获取path
              activeMenu:'list',
              title:'添加商品',
            }
          },
        ]
      },
      {
        path: '/order',
        name:'ordermanage',
        component: OrderManage,
        redirect:'/order/list',
        meta:{
          title:'订单管理',
        },
        children:[
          {
            path: 'list',
            name:'orderlist',
            component: OrderList,
            meta:{
              title:'订单列表',
            },
          },
          {
            path: 'collect',
            name:'collect',
            component: Collect,
            meta:{
              title:'订单汇总',
            },
          },
          {
            path: 'contract',
            name:'contract',
            component: Contract,
            meta:{
              title:'订单合同',
            },
          },
        ]
      },
      {
        path: '/advert',
        name:'advert',
        component: Advert,
        redirect:'/advert/list',
        meta:{
          title:'广告分类',
        },
        children:[
          {
            path: 'manage',
            name:'manage',
            component: AdvertManage,
            meta:{
              title:'广告管理',
            },
          },
          {
            path: 'list',
            name:'advertlist',
            component: AdvertList,
            meta:{
              title:'广告列表',
            },
          },
        ]
      },
      {
        path: '/system',
        name:'system',
        component: SystemManage,
        redirect:'/system/role',
        meta:{
          title:'系统管理',
        },
        children:[
          {
            path: 'role',
            name:'role',
            component: Role,
            meta:{
              title:'角色管理',
            },
          },
          {
            path: 'department',
            name:'department',
            component: Department,
            meta:{
              title:'部门管理',
            },
          },
        ]
      }
]

